<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="modal.ProductModal" %>
<%@ page import="java.util.ArrayList" %>

<% ArrayList<ProductModal> results = (ArrayList<ProductModal>)request.getAttribute("results");  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="header.jsp" flush="true" />
<title>Bid-Market</title>
</head>
<body>
<ul class="media-list">
		<%for (ProductModal prod: results){ %>
		 <li class="media">
		  <div class="media-left media-bottom">
		    <a href="#">
		      <img class="pull-left" src="<%=prod.getPhotoUrl() %>" alt="" height=200px>
		    </a>
		  </div>
		  <div class="media-body">
		    <h4 class="media-heading"> <%if (prod.getStatus()==1){out.println("--SOLD--");} %> <a href="../BidMarket/ProductController/<%=prod.getProductId()%>"> <%=prod.getName()%> </a> </h4>
		   	 <%= prod.getDescription() %>
		  </div>
		 </li><%} %>
</ul>
</body>
</html>